<!DOCTYPE html>
<html lang="en">
<head>
    <meta http-equiv="Content-Type"content="text/html;charset=UTF-8">
    <title>Title</title>
    <script language="JavaScript" src="/static/js/jquery-1.9.1.min.js"></script>
    <script>
/*        $(function(){
            alert("123");
        });*/

        $.ajax({
            type: "POST",
            url: "/text/testJsonReq.json",
            contentType : "application/json",       //默认值: "application/x-www-form-urlencoded"
            data:'{"userName":"xiaoming","userSex":"男","userAge":12}',
            datType: "JSON",
            success:function(data){
                alert("插入成功,返回值：" + data.toString());
            },
            error:function () {
                alert("插入失败，"+data.responseText);
            }
        });
    </script>
</head>
<body>

</body>
</html>